package com.ctshk.app.order.airexpress.controller;

import com.ctshk.common.annotations.OperationLogAnnotation;
import com.ctshk.common.dto.Result;
import com.ctshk.common.enums.OperationLogModel;
import com.ctshk.common.enums.OperationLogType;
import com.ctshk.common.web.support.BaseController;
import com.ctshk.rpc.order.airexpress.dto.app.AppQueryPayResultPcDTO;
import com.ctshk.rpc.order.airexpress.service.IAirportExpressOrderAppService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 机场快线 前端控制器
 * </p>
 *
 * @author 叶冠峰
 * @since 2021-02-23
 */
@Slf4j
@RestController
@RequestMapping("/air/express/pc")
@Api(value = "机场快线订单服务-PC", tags = "机场快线订单服务-PC")
public class AirExpressOrderPCController extends BaseController {

    @DubboReference
    IAirportExpressOrderAppService airportExpressOrderAppService;

    @ApiOperation(value = "机场快线-查询支付结果", notes = "机场快线-查询支付结果")
    @OperationLogAnnotation(operModul = OperationLogModel.ORDER, operType = OperationLogType.QUERY, operTitle = "机场快线-查询支付结果", operDesc = "机场快线-查询支付结果")
    @GetMapping("/pay/result/{id}")
    public Result<AppQueryPayResultPcDTO> queryPayResultPc(@PathVariable("id") Long id) {
        return airportExpressOrderAppService.queryPayResultInfoPc(id);
    }
}
